<?php
Class Plugins_Translate extends Zend_Controller_Plugin_Abstract{

   public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request){
   	
      $sessionLanguage = new Zend_Session_Namespace('language');
      $sessionLanguage->lang = $request->getParam('language','pt_BR');
      $translate = Zend_Registry::get('translator');
      $translate->setLocale($sessionLanguage->lang);
      return true;
   }
}
